<template>
    <div class="page-container">
        <div class="grid-container">
            <a-row type="flex" class="grid-table-tool">
                <a-col :span="10" :order="1" class="tool-action">
                    <a-input-search placeholder="优惠券名称" v-model="params.title" @search="onSearch" style="width:300px;">
                        <a-button icon="search" type="primary" slot="enterButton">筛选</a-button>
                    </a-input-search>
                </a-col>
                <a-col :span="14" :order="2" class="tool-pagination">
                    <a-button type="primary" icon="plus" @click="onAdd()">新增</a-button>
                </a-col>
            </a-row>
            <coupon-table-list :title="title"></coupon-table-list>
        </div>
    </div>
</template>

<script>
    import {CouponTableList} from "./components";

    export default {
        name: "CouponList",
        components:{CouponTableList},
        data(){
            return{
                title:'',
                params:{
                    title:''
                }
            }
        },
        methods:{
            onSearch(){
                this.title = this.params.title
            },
            onAdd(){
                this.$router.push({name:'CouponAdd'})
            },

        },
        mounted(){
        }
    }
</script>

<style scoped>

</style>